<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\wechat\WechatFans */

$this->title = $model->nickname;
$this->params['breadcrumbs'][] = ['label' => 'Wechat Fans', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>


<section class="wrapper site-min-height">
    <!-- page start-->
    <section class="panel">
        <header class="panel-heading">
              <?= Html::a('返回','javascript:history.back(-1)'); ?>  <?= Html::encode($this->title) ?>
        </header>
        <div class="panel-body">
            <div class="adv-table editable-table ">

                <div class="wechat-fans-view">


                    <?= DetailView::widget([
                        'model' => $model,
                        'template' => '<tr><th>{label}</th><td>{value}</td></tr>',
                        'options' => ['class' => 'table table-condensed'],
                        'attributes' => [
                            'id',
                            'openid',
                            'nickname',
                            [
                                'attribute'=>'avatar',
                                'format' => 'raw',
                                'value' => function($model){
                                    return Html::img($model->avatar,['width'=>100]);
                                }

                            ],
                            [
                                'attribute' => 'followtime',
                                'value'=>function($m){
                                    return date('Y-m-d H:i:s',$m->followtime);
                                }
                            ],
                            'tagsname'
                        ],
                    ]) ?>

                </div>
            </div>
        </div>
    </section>
</section>